package com.iu.eblood.model;

import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;


/**
 * The persistent class for the NEWS database table.
 * 
 */
@Entity
@Table(name="NEWS")
public class News implements Serializable {
	private static final long serialVersionUID = 1L;
	private long newsid;
	private String content;
	private Timestamp createddate;
	private Timestamp deleteddate;
	private String isactive;
	private String ttitle;
	private User user;

    public News() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	public long getNewsid() {
		return this.newsid;
	}

	public void setNewsid(long newsid) {
		this.newsid = newsid;
	}


	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}


	public Timestamp getCreateddate() {
		return this.createddate;
	}

	public void setCreateddate(Timestamp createddate) {
		this.createddate = createddate;
	}


	public Timestamp getDeleteddate() {
		return this.deleteddate;
	}

	public void setDeleteddate(Timestamp deleteddate) {
		this.deleteddate = deleteddate;
	}


	public String getIsactive() {
		return this.isactive;
	}

	public void setIsactive(String isactive) {
		this.isactive = isactive;
	}


	public String getTtitle() {
		return this.ttitle;
	}

	public void setTtitle(String ttitle) {
		this.ttitle = ttitle;
	}


	//bi-directional many-to-one association to User
    @ManyToOne
	@JoinColumn(name="AUTHORID")
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
}